//
//  ViewController.swift
//  LLNavigationController
//
//  Created by tianyuchengok@163.com on 07/20/2020.
//  Copyright (c) 2020 tianyuchengok@163.com. All rights reserved.
//

import UIKit

import LLNavigationController

class ViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view, typically from a nib.
        self.llTintColor = UIColor.red
        self.llBarShadowHidden = true
        self.llSetNeedsUpdateNavigationBar()
        self.title = "VIewController"
        // Do any additional setup after loading the view.
        self.view.backgroundColor = UIColor.green
        let btn = UIButton.init(frame: CGRect.init(x: 100, y: 300, width: 90, height: 90))
        self.view.addSubview(btn)
        btn.setTitle("push", for: .normal)
        btn.addTarget(self, action: #selector(push), for: .touchUpInside)
        btn.backgroundColor = UIColor.blue
        
        let bt1 = UIButton.init(frame: CGRect.init(x: 250, y: 300, width: 90, height: 90))
        self.view.addSubview(bt1)
        bt1.setTitle("pressent", for: .normal)
        bt1.addTarget(self, action: #selector(pressent), for: .touchUpInside)
        bt1.backgroundColor = UIColor.blue
    }

//    func setNaviType()  {
//        self.llBarTintColor = UIColor.yellow
//        self.llTintColor = UIColor.black
//        self.navigationController?.navigationBar.shadowImage = nil
//
//
//        let dic = [NSAttributedString.Key.font : UIFont.systemFont(ofSize: 18), NSAttributedString.Key.foregroundColor: UIColor.black]
//        self.llTitleTextAttributes = dic
//    }
    override func viewDidAppear(_ animated: Bool) {
        super.viewDidAppear(animated)
    }
    
    @objc func push() {
        let vc = secondViewController()
        self.navigationController?.pushViewController(vc, animated: true)
    }
    @objc func pressent() {
        let vc = secondViewController()
        self.navigationController?.show(LLNavigationController.init(rootViewController: vc), sender: nil)
    }
}

